
<div id="id_insert_webcomics_in_category_here">
<% if @result2 %>
<% if @result2[:type] == :category%>
<table width="100%" align="center">
  <tr><td><h2><%= @result2[:heading]%></h2></td></tr>
  <% if @result2[:data].length > 0%>
  <tr>
    <th>Title</th>
    <th># of Views</th>
    <th>Last Updated</th>
  </tr>
  <% end %>
  <% i = 0%>  
  <% for webcomic in @result2[:data] %>
    <% if i % 2 == 0 %>
    <% x = "even" %>
    <% else %>
    <% x = "odd" %>
    <% end %>  
  <tr>
    <%= "<td class=\"" + x + "\" width=\"70%\">"%>      
      <%= link_to webcomic.title, webcomic%>
    </td>
    <%= "<td class=\"" + x + "\" width=\"15%\">"%>            
      <%= webcomic.number_of_views %>
    </td>
    <%= "<td class=\"" + x + "\" width=\"15%\">"%>                
      <%= webcomic.updated_at.strftime("%m-%d-%Y") %>
    </td>
  </tr>
  <% i = i + 1%>    
  <% end %>
  </table>  
  <% else %>


  <table>
    <% if @result2[:data].length > 0%>
    <tr>
      <th>Title</th>
      <th># of Views</th>
      <th>Last Updated</th>
    </tr>
    <% end %>

    <% for aCategory in @result2[:data].keys.sort %>
    <tr width="100%">
      <td class="letterHeader"><h2><%= aCategory %></h2></td>
      <td class="letterHeader"></td><td class="letterHeader"></td>      
    </tr>
    <% i = 0 %>
    <% for webcomic in @result2[:data][aCategory] %>
    <% if i % 2 == 0 %>
    <% x = "even" %>
    <% else %>
    <% x = "odd" %>
    <% end %>
    <tr>
      <%= "<td class=\"" + x + "\" width=\"70%\">"%>
        <%= link_to webcomic.title, webcomic%>
      </td>
      <%= "<td class=\"" + x + "\" width=\"15%\">"%>
        <%= webcomic.number_of_views %>
      </td>
      <%= "<td class=\"" + x + "\" width=\"15%\">"%>
        <%= webcomic.updated_at.localtime.strftime("%m-%d-%Y") %>
      </td>
    </tr>
    <% i += 1 %>
    <% end %>
    <% end %>
  </table>






























    







    
  
  <% end %>
<% end %>
</div>